package chapter_8.coll;

import java.util.HashMap;
import java.util.Map;

public class Test2 {

    public static void main(String[] args) {

        HashMap<String,String> map1 = new HashMap<>();
        map1.put("001","李小龙");

        HashMap<String,String> map2 = new HashMap<>();
        map2.put("001","泰森");

        HashMap<String, Map<String,String>> map = new HashMap<>();
        map.put("java",map1);
        map.put("c++",map2);

        for (Map.Entry<String, Map<String, String>> entry : map.entrySet()) {
            System.out.println("这是"+entry.getKey()+"班");
            for (Map.Entry<String, String> mapentry : entry.getValue().entrySet()) {
                System.out.println(mapentry.getKey()+"=" +entry.getValue());
            }
        }
    }
}
